(function() {
  document.getElementById("search").addEventListener("click", function() {
    const query = document.getElementById("searchInput").value.trim();
    if(query !== "") {
      console.log(query);
      window.location.href = "http://localhost:8086/web/custom_scripts/pages/search.html?q=" + query;
    }
  });
})();